package com.yunpeng.dishes.dao.mapper.entity;

import com.yunpeng.dishes.dao.mapper.IBaseMapper;
import com.yunpeng.dishes.dao.model.entity.MerchantDishesDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * IMerchantDishesMapper
 *
 * @author : Moore(hemw)
 * @date : 2020-03-27
 */
@Mapper
public interface IMerchantDishesMapper extends IBaseMapper<MerchantDishesDO> {
    /**
     * 根据name获取实体列表
     *
     * @param name
     * @return
     */
    List<MerchantDishesDO> queryForListByName(String name);

    /**
     * 根据代码集合获取实体集合
     *
     * @param codes
     * @return
     */
    List<MerchantDishesDO> queryForListByCodes(@Param(value = "codes") List<String> codes);

    /**
     * 根据商户菜品id获取菜品营养成分菜品数据
     *
     * @param relationId
     * @return
     */
    MerchantDishesDO getByRelationId(Long relationId);

    /**
     * 根据订单菜品id查询商户菜品
     *
     * @param orderDishesIds
     * @return
     */
    List<MerchantDishesDO> queryForListByRelationIds(@Param("relationIds") List<Long> orderDishesIds);
}
